package com.example.demo810.event;

import com.example.demo810.repo.UserRepo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEvent;

import java.util.Date;

/**
 *
 * 事件的本质是 观察者模式
 * 观察者模式（Observer），又叫发布-订阅模式（Publish/Subscribe）
 * https://www.cnblogs.com/adamjwh/p/10913660.html
 *
 * https://blog.csdn.net/weixin_37910453/article/details/90117011?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-3.add_param_isCf&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-3.add_param_isCf
 *
 * @author lzh
 * @date 2020/8/11 - 18:04
 */
public class EventTest extends ApplicationEvent {



    private static final long serialVersionUID = 1L;
    private String message;
    public EventTest(Object source, String message) {
        super(source);
        this.message = message;
    }
    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }

}
